<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Banner/index')}">轮播图列表</a></li>
        <li><a href="{:url('Banner/edit')}">修改轮播图</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Banner/editPost')}">
        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label">封面</label>
            <div class="form-group">
                <div class="col-md-6 col-sm-10">
                    <input id="photo-1" type="hidden" name="image"  value="{$banner.image}">
                    <input id="photo-1-name" class="form-control" type="text" name="photo_name" title="图片名称" disabled readonly>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label"></label>
                <div class="col-md-6 col-sm-10">
                    <img id="photo-1-preview" width="40px" src="{$banner.image}">
                    <a href="javascript:uploadOneImage('图片上传','#photo-1');" class="btn btn-primary">上传</a>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="input-url" class="col-sm-2 control-label">跳转路径<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-url" name="url" value="{$banner.url}">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" value="{$banner.id}" name="id">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>